home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 11 / Mac Magazin and MacEasy Magazine CD - Issue 11.iso / Sharewarebibliothek / Utilities / PRAM-Reader 1.1.2 / Developers / xPRAM map < prev   
Text File  |  1995-05-28  |  6KB  |  134 lines

  1. Here is some snipped of my post:
  2.  
  3. X-POP3-Rcpt: wuttke@linteuto
  4. Date: Sun, 19 Feb 95 12:36:01 -0600
  5. From: oleg@ponder.csci.unt.edu (Kiselyov Oleg)
  6. To: wuttke@stein.teuto.de
  7. Subject: Re: PRAM-Reader 1.0
  8.  
  9.  
  10. Hi!
  11.  
  12.         I just read your announcement about the PRAM reader. I thought
  13. you might be interested in similar (but not exactly the same) programs
  14. I wrote to handle PRAM and Extended PRAM. I'm enclosing a blurb of the
  15. submission to the info-mac I made some time ago. I guess the
  16. applications/source etc are still there (if not, I can mail/ftp them:
  17. everything is free).  I must admit the interface of my programs is a
  18. bit ungainly, I never was a good designer <sigh>. Anyway, should you
  19. have any questions/comments, I'll be glad to hear them.
  20.  
  21.         Cheers,
  22.                                         Oleg
  23.  
  24. ------------------------------------------------------------------------
  25.  
  26. What:   save the PRAM and extended PRAM and restore it on start-up
  27. Contents:
  28.         PRAM boss       - System extension (but can run as application
  29.                           if the file type changed from INIT to APPL)
  30.         PRAM boss.pi    - Project for the application part of PRAM boss
  31.         PRAM save.cc    - Source code for the application part of PRAM boss
  32.         PRAM reset.pi   - Project for the INIT resource that restores PRAM
  33.         PRAM reset.c    - source code for the INIT resource
  34.         PRAM guard.*    - application and the source code to set/restore
  35.                           just the regular PRAM at any time
  36.         The source code contains enough (I hope) comments to show what
  37.         a particular piece of code does, as well as some tricks involved
  38. Language: Symantec C/C++ 6.0 and built-in Assembler
  39. System: System 7.x, but probably 6.x is OK, too. Tested on IIsi, IIci, 
  40.         Quadras and Centres.
  41. Note: the source code uses a "standard" environment, see myenv-notify.cpt
  42. Comments to: oleg@ponder.csci.unt.edu, oleg@unt.edu
  43. References: DiskParam (/info-mac/util/), SetXParam (from redback.cs.uwa.edu.au
  44.          (130.95.80.61) as "/ComSci/LabUtilities/SetXParam.sit")
  45. Special note: for a map of the extended PRAM, read on.
  46.  
  47. Explanation:
  48. PRAM boss is a better version of DiskParam. The PRAM boss is a bundle
  49. of an application and an INIT resource. The application (when
  50. double-clicked) just dumps the contents of the 20-byte regular PRAM
  51. plus the contents of the entire Extended PRAM into a 'HEXA' resource.
  52. The INIT resets the regular PRAM and (a part of) the extended PRAM to
  53. the values saved into the 'HEXA' resource. The date/time is not
  54. spoiled!  So, you can run the application on your computer and create
  55. a HEXA resource with some 'standard' settings. Then you can change the
  56. creator to INIT and drop the (now a 'System Extension') into the
  57. Extensions folder. From that moment on, whenever you restart your Mac,
  58. the PRAM and extended PRAM are reset to their "standard" values. You
  59. can even delete the code resource with the Resource editor: that way
  60. there is no way you can change the "standard" values. It's perfect for
  61. computers in the Lab. The INIT that resets the PRAMs does NOT
  62. patch the system, nor it takes any memory in the system heap,
  63. etc. After it resets the PRAM, it quietly quits without leaving any
  64. traces in the system. The distribution contains the compiled PRAM boss
  65. in the guise of the System extension. To run it as an application,
  66. change the file type to APPL.
  67. PRAM guard is my early experiment, it works only with the regular
  68. PRAM, but it's got a nice (I hope) user interface written in C++!
  69.  
  70. Map of the extended PRAM (for references)
  71.         from the article posted in comp.sys.mac.{programmer,system,
  72. hardware} with comments from ez015670@othello.ucdavis.edu, quinn@cs.uwa.edu.au,
  73. wolfson@ll.mit.edu, and small corrections
  74.  
  75.                             Extended PRAM Map
  76. Loc     Length          Related to
  77. (hex)   (dec)
  78.  
  79. 1       1               Used by a system program _InternalWait
  80.  
  81. 8       4               Looks like the last 4 bytes of the regular PRAM
  82.                         (See IM, Vol II, OS Util)
  83.  
  84. 10     16               Looks like the first 16 bytes of the regular PRAM
  85.                         (See IM, Vol II, OS Util)
  86.                         
  87. 76      1               Has something to do with the RAM disk size
  88. 78      4               Startup Disk info (apparently, SCSI id, or smth)
  89.  
  90. 7C      2               System Beep. As was pointed out earlier, it's
  91.                         in fact an id (short int) of the corresponding 
  92.                         'snd ' resource in the System file.
  93.                         Accessed through the Sound control panel
  94.  
  95. 7E      1               Used by a system program _InitProcMenu
  96. 7F      1               Apparently it has smth to do with the way windows
  97.                         and dialogs appear on the screen
  98.  
  99. 80      2               Used by a system program _GetVideoDefault
  100.                         Apparently, some default video settings
  101.  
  102. 82      6               Hilite Color, apparently in the RGB format.
  103.                         Setup through the Color control panel
  104.  
  105. 8A      1               Bit field: Memory/cache control flags
  106.            1xxx xxxx    68040 Cache is OFF | Toggled through Cache control
  107.            0xxx xxxx    68040 Cache is ON  | panel
  108.            xxxx x1x1    32-bit addressing is ON (toggled through the Memory
  109.                         control panel)
  110.  
  111. AF      1               Has something to do with the RAM disk size
  112.  
  113. BD     33               Used (and set!) by some system programs in ROM,
  114. DE      2               at addresses 8009d544 and 8009D73C. BTW, the beginning
  115.                         of the field at loc 0xBD looks like the name of a
  116.                         default AppleTalk zone 
  117.  
  118. E0      4               Network: contains info if AppleTalk is active
  119.                         and the selected network access (say, LocalTalk
  120.                         or EtherTalk). See Chooser and Network control panel
  121.  
  122. E4     12               Latitude/Longitude of the place the Mac is at
  123.                         Setup through the Map Control panel
  124.  
  125.  
  126. ez015670@othello.ucdavis.edu also commented that
  127.  
  128. > One thing that you left out was the total power on hours is also in
  129. > the xpram.  It is a 16 bit word.  That contains the total time the
  130. > computer has been on in 5 minute intervals.
  131.  
  132. > Supposedly there is also some creation stuff in their to that tells
  133. > when the machine was made, but I can not make sense of it.
  134.